﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace USNetFramework.Network
{
    public enum ProtocolType
    {
        sproto = 1,
        protobuf,
    }

    public class NetOption
    {
        public static int SOCKET_TCP_BUFFER = 1024 * 512;               // 网络缓冲 512K
        public static int SOCKET_MAX_RECV_SIZE = 1024 * 16;             // 接受缓冲区 16K
        public static int SOCKET_MAX_SEND_SIZE = 1024 * 16;             // 发送缓冲区 16K(暂时没用)

        public static bool RPCEnable = true;                            // 是否开启RPC
        public static long RPCTimeOut = 30;                             // RPC超时时间

        public static bool HeartBeatEnable = false;                     // 心跳检测开启
        public static uint HeartInterval = 10000;                       // 心跳检测间隔(秒)

        // public static bool EncryptEnable;                            // 加密开启(以后再说)
   
        public static int Timeout = 6000;                               // 超时时间

        // 域名
        public static string[] DomainSuffixList =
        {
            "localhost",
            ".com", ".net", ".org", ".cn", ".cx", ".cc", ".co", ".io"
        };
    }
}
